﻿using System.Net.WebSockets;

namespace CSharpPro._1027;

public class Demo
{
    private int id; //字段feild
    private string name;
    public int Id
    {
        //get => id;
        get
        {
            return id;
        }
        //set => id = value;
        set
        {
            id = value;
        }
    }
    public string Name
    {
        get => name;
        set =>name=value ??throw new ArgumentNullException(nameof (value));
    }
    public void TestPrint()
    {
        int result=Add(10, 20);
        Console.WriteLine(result);
        int i=Convert.ToInt32("123");
    }
    public int Add(int a, int b)
    {
        return a + b;
    }
    public string Add(string a, string b)
    {
        return a + b;
    }
    

}